//
//  UIAlertView+Click.m
//  Dingdong
//
//  Created by 程强 on 16/12/2.
//  Copyright © 2016年 程强. All rights reserved.
//

#import "UIAlertView+Click.h"
#import <objc/runtime.h>


static const void *externClick = &externClick;

@implementation UIAlertView (Click)
@dynamic clickBlock;

- (void)click:(void (^)(NSInteger))block
{
    self.clickBlock = block;
}
- (void)setClickBlock:(AlertClickBlock)clickBlock
{
    objc_setAssociatedObject(self, externClick, clickBlock, OBJC_ASSOCIATION_COPY);
}
- (AlertClickBlock)clickBlock
{
    return objc_getAssociatedObject(self, externClick);
}
@end
